import request from '@/utils/request'

export async function login(data) {
  return request({
    url: '/api/login',
    method: 'post',
    data,
  })
}

export function getUserInfo() {
  return request({
    url: '/api/get_user',
    method: 'post',
  })
}

export function logout() {
  return request({
    url: '/api/logout',
    method: 'post',
  })
}

export function register(data) {
  return request({
    url: '/api/register',
    method: 'post',
    data,
  })
}
// 验证码
export function getCode(data) {
  return request({
    url: '/api/get_code',
    method: 'post',
    data,
  })
}

// 修改密码
export function setPwd(data) {
  return request({
    url: '/api/set_pwd',
    method: 'post',
    data,
  })
}

// 验证码登录  验证码
export function wapGetCode(data) {
  return request({
    url: '/api/h5/wap_get_code',
    method: 'post',
    data,
  })
}

// 验证码登录
export function smslogin(data) {
  return request({
    url: '/api/smslogin',
    method: 'post',
    data,
  })
}
